package com.yiyahui.project.erp.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiyahui.project.erp.mapper.YiyaChannelMapper;
import com.yiyahui.project.erp.domain.YiyaChannel;
import com.yiyahui.project.erp.service.IYiyaChannelService;

/**
 * 渠道Service业务层处理
 * 
 * @author yiyahui
 * @date 2020-05-03
 */
@Service
public class YiyaChannelServiceImpl implements IYiyaChannelService 
{
    @Autowired
    private YiyaChannelMapper yiyaChannelMapper;

    /**
     * 查询渠道
     * 
     * @param id 渠道ID
     * @return 渠道
     */
    @Override
    public YiyaChannel selectYiyaChannelById(Long id)
    {
        return yiyaChannelMapper.selectYiyaChannelById(id);
    }

    /**
     * 查询渠道列表
     * 
     * @param yiyaChannel 渠道
     * @return 渠道
     */
    @Override
    public List<YiyaChannel> selectYiyaChannelList(YiyaChannel yiyaChannel)
    {
        return yiyaChannelMapper.selectYiyaChannelList(yiyaChannel);
    }

    /**
     * 新增渠道
     * 
     * @param yiyaChannel 渠道
     * @return 结果
     */
    @Override
    public int insertYiyaChannel(YiyaChannel yiyaChannel)
    {
        return yiyaChannelMapper.insertYiyaChannel(yiyaChannel);
    }

    /**
     * 修改渠道
     * 
     * @param yiyaChannel 渠道
     * @return 结果
     */
    @Override
    public int updateYiyaChannel(YiyaChannel yiyaChannel)
    {
        return yiyaChannelMapper.updateYiyaChannel(yiyaChannel);
    }

    /**
     * 批量删除渠道
     * 
     * @param ids 需要删除的渠道ID
     * @return 结果
     */
    @Override
    public int deleteYiyaChannelByIds(Long[] ids)
    {
        return yiyaChannelMapper.deleteYiyaChannelByIds(ids);
    }

    /**
     * 删除渠道信息
     * 
     * @param id 渠道ID
     * @return 结果
     */
    @Override
    public int deleteYiyaChannelById(Long id)
    {
        return yiyaChannelMapper.deleteYiyaChannelById(id);
    }
}
